package com.toilet.easyvideofx.model;

import java.util.Objects;

/**
 * 配置model
 * @author snowfrake
 */
public class SetConfig {
    /**
     * 配置id
     */
    private Long id;
    /**
     * 配置名称
     */
    private String configName;

    public SetConfig(Long id, String configName) {
        this.id = id;
        this.configName = configName;
    }

    /**
     * 这个方法是为了在listview中显示
     *
     * @return
     */
    @Override
    public String toString() {
        return configName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SetConfig setConfig = (SetConfig) o;
        return Objects.equals(id, setConfig.id) && Objects.equals(configName, setConfig.configName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, configName);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getConfigName() {
        return configName;
    }

    public void setConfigName(String configName) {
        this.configName = configName;
    }
}
